<?php
  error_reporting(0);
  session_start();
  if ($_SESSION["tipo"]!=1 || ($_POST["val"] != "no" && $_POST["val"] != "si")){
      header ("Location: index.php");
  }
  include_once('fachadaBD.php');
  $f = new fachadaBD();
//echo "<h1> PASO";
  if ($_POST["val"] == "no"){
    $ret = $f->reprobar($_POST["id"]);
  }else if ($_POST["val"] == "si"){
    $ret = $f->aprobar($_POST["id"]);
  }else{
    echo "<h1> ERROR EN DROP.PHP GET[r]=".$_POST["val"]."</h1>";
    $f->cerrar();
    exit(0);
  }
  $f->cerrar();
  header ("Location: admin.php");
//echo " \PASO </h1>";
?>
